<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">
<head>
    <meta charset="UTF-8">
    <title>课程大类信息列表</title>
    <link rel="icon" th:href="@{/favicon.ico}">
    <link rel="shortcut icon" th:href="@{/favicon.ico}">
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <link type="text/css"  th:href="@{/css/index.css}" rel="stylesheet"  />
    <link type="text/css"  th:href="@{/css/jconfirm.css}" rel="stylesheet"  />
    <script th:src="@{/js/jQuery1.7.2.js}" type="text/javascript"></script>
    <script th:src="@{/js/index.js}" type="text/javascript"></script>
    <script th:src="@{/js/jconfirm.js}" type="text/javascript"></script>
</head>
<body>
    <div class="mian_center">
        <span class="main_titile"><img th:src="@{/images/login_j_03.png}">课程大类信息查询</span>

        <div class="main_con">
            <form id="searchFr" th:action="@{/courseType/list}" method="get">
                <ul>
                    <li><span>课程大类名称:</span><input name="courseTypeName" type="text" th:value="*{param.courseName}" placeholder="请输入课程大类名称" autocomplete="off" /></li>
                    <li shiro:hasPermission="user:list"><span>状态:</span>
                        <select name="flag">
                            <option value="">【请选择】</option>
                            <option th:selected="*{param!=null && #strings.equals(param.flag,'1')}"
                                    th:value="1">已删除</option>
                            <option th:selected="*{param!=null && #strings.equals(param.flag,'0')}"
                                    th:value="0">未删除</option>
                        </select>
                    </li>
                    <li><span class="msg">[[${msg}]]</span></li>
                </ul>
                <span class="main_button">
                    <input  id="pSize"  name="pSize" type="hidden" th:value="*{param.pSize}" />
                    <input  id="currentPn"  name="pn" type="hidden" th:value="*{param.pn}" />
                    <input type="submit" value="查询" />
                </span>
            </form>
            <table>
                <tr>
                    <th width="30"><input type="checkbox" id="selectAll"></th>
                    <th width="50">序号</th>
                    <th>课程类型名称</th>
                    <th shiro:hasPermission="user:list">创建时间</th>
                    <th shiro:hasPermission="user:list">修改时间</th>
                    <th>操作</th>
                </tr>
                <tr th:each="courseType : ${courseTypes}" th:unless="${#lists.isEmpty(courseTypes)}">
                    <td><input type="checkbox" class="selectItem" th:value="${courseType.courseTypeId}"></td>
                    <td>[[${courseType.courseTypeId }]]</td>
                    <td>[[${courseType.courseTypeName }]]</td>
                    <td shiro:hasPermission="user:list">[[${courseType.createTime==null?'--':#dates.format(courseType.createTime,'YYYY/MM/dd HH:mm:ss')}]]</td>
                    <td shiro:hasPermission="user:list">[[${courseType.updateTime==null?'--':#dates.format(courseType.updateTime,'YYYY/MM/dd HH:mm:ss')}]]</td>
                    <td>
                        <a shiro:hasPermissions="[courseType:list,courseType:add]" class="btn mr5" th:href="@{/courseType/edit(courseTypeId=${courseType.courseTypeId })}" title="修改">修改</a>
                        <a shiro:hasPermissions="[courseType:list,courseType:add]" th:if="${#strings.equals(courseType.flag,'0')}" class="btn" th:href="${'javascript: remove('+courseType.courseTypeId+');'}" title="删除">删除</a>
                        <a shiro:hasPermission="user:list" th:if="${#strings.equals(courseType.flag,'1')}" class="btn" th:href="${'javascript: remove('+courseType.courseTypeId+');'}" title="删除">删除</a>
                    </td>
                </tr>
                <tr th:if="${#lists.isEmpty(courseTypes)}">
                    <td colspan="6">暂无任何记录</td>
                </tr>
            </table>
        </div>

        <div class="main_page_number"
             th:unless="${#lists.isEmpty(courseTypes)}" th:include="/common/page :: page">
        </div>
    </div>
</body>
</html>